package com.iaiai.notepad;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends Activity {

	private Button btnOpen;

	private Button btnNew;

	private void init() {
		btnOpen = (Button) findViewById(R.id.btnOpen);
		btnNew = (Button) findViewById(R.id.btnNew);

		btnNew.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Intent it = new Intent(MainActivity.this,
						NewNotepadActivity.class);
				startActivity(it);
			}
		});
		btnOpen.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Intent it = new Intent(MainActivity.this, FileActivity.class);
				startActivity(it);
			}
		});
	}

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		init();
	}
}